import { SET_LOADING_STATUS, SET_COLLAPSE_STATUS, SET_CURRENT_DATE } from '../actionTypes';
// state
const storeState = {
  loading: false,
  collapse: false,
  currentDate: new Date().getTime(),
};

// mutations
const mutations = {
  [SET_LOADING_STATUS](state, param) {
    state.loading = param;
  },
  [SET_COLLAPSE_STATUS](state, param) {
    state.collapse = param;
  },
  [SET_CURRENT_DATE](state, param) {
    state.currentDate = param;
  },
};

export default {
  namespaced: true,
  state: storeState,
  mutations,
};
